<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterTableLoanApply extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('loan_apply', function (Blueprint $table) {
            $table->unsignedInteger('amount')->comment('批复金额,以分为单位')->change();
            $table->unsignedInteger('arrival_account')->comment('实际到账金额,以分为单位')->change();
            $table->unsignedInteger('pre_insurance_amt')->comment('前置险金额,以分为单位')->change();
            $table->unsignedInteger('performance_insurance')->comment('用户履约保险,以分为单位')->change();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('loan_apply', function (Blueprint $table) {
            $table->unsignedDecimal('amount',10,2)->comment('批复金额,以分为单位')->change();
            $table->unsignedDecimal('arrival_account',10,2)->comment('实际到账金额,以分为单位')->change();
            $table->unsignedDecimal('pre_insurance_amt',10,2)->comment('前置险金额,以分为单位')->change();
            $table->unsignedDecimal('performance_insurance',10,2)->comment('用户履约保险,以分为单位')->change();
        });
    }
}
